package com.example.aigc_education.enums;


import lombok.Getter;

@Getter
public enum PlanTargetType {
    BEGINNER("初学者"),
    INTERMEDIATE("中阶学习者"),
    ADVANCED("高阶学习者");


    private final String title;


    PlanTargetType(String title) {
        this.title = title;
    }


    public static PlanTargetType fromTitle(String title) {
        for (PlanTargetType planTargetType : PlanTargetType.values()) {
            if (planTargetType.getTitle().equals(title)) {
                return planTargetType;
            }
        }
        throw new IllegalArgumentException("No enum constant with title " + title);
    }
}
